<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<!-- 2. 点击登陆 弹出登录框点击X关闭登录框   -->

<body>
  <div id="app">
    <div v-if="!abb" @click="add">登录</div>
    <div v-else>
      <span @click="add">×</span>
    </div>

  </div>
</body>
<script src="./vue.js"></script>
<script>
  const { createApp, ref } = Vue;
  createApp({
    setup() {
      const abb = ref(false);


      function add() {
        abb.value = !abb.value;
      }

      return {
        abb,
        add
      }
    }
  }).mount('#app')
</script>

</html>